package com.ruoyi.cpsp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.cpsp.domain.Department;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DepartmentMapper extends BaseMapper<Department>
{
    Integer deleteByDepartmentId(@Param("departmentId") String departmentId);

    int insert(Department department);

    /**
     * 根据 departmentId 查找部门
     * @param departmentId
     * @return
     */
    Department selectByDepartmentId(@Param("departmentId") String departmentId);

    List<Department> selectAll();
}
